import request from '../utils/request'
const api_name = '/course'
export default {
    //获取首页中的讲师和课程数据
    getIndexData() {
        return request({
            url: `http://39.98.120.230:8080/api/course/indexdata`,
            method: 'get',
        })
    },
    //获取分页课程列表
    getCourseList(page, limit, searchObj) {
        return request({
            url: `http://39.98.120.230:8080/api/course/list/${page}/${limit}`,
            method: 'post',
            data: searchObj
        })
    },
    //根据id获取课程详情
    getCourseDetail(id) {
        return request({
            url: `http://39.98.120.230:8080/api/course/detail/${id}`,
            method: 'get',
        })
    }
}